package com.sasis.dao.ibatis;

import java.util.Collection;
import java.util.HashMap;
import java.util.Map;

import com.sasis.dao.UserHandlePermissionDao;
import com.sasis.model.UserHandlePermission;

public class UserHandlePermissionDaoIbatisImpl extends BaseDaoIbatisImpl implements UserHandlePermissionDao {

	public UserHandlePermissionDaoIbatisImpl() {
		super(UserHandlePermission.class);
	}

	public UserHandlePermission loadByPermission(Long userId, Long handleId) {
		Map params = new HashMap();
		params.put("userId", userId);
		params.put("handleId", handleId);
		return (UserHandlePermission) getSqlMapClientWrapper().queryForObject("loadByPermission", params);
	}
	
	public Collection findByAllow(Long userId) {
		return getSqlMapClientWrapper().queryForList("findByAllow", userId);
	}
}

